﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Indochinaodyssey.UserControl.Search
{
    public partial class Search : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
           
        }

        protected void btnSearch_Click(object sender, EventArgs e)
        {
            
            Response.Redirect("Search.aspx?Loai="+ddlType.SelectedValue+"&price="+ddlPrice.SelectedValue);
        }

        protected void ddlType_PreRender(object sender, EventArgs e)
        {
            if ((Request.QueryString["loai"] != null) && (Request.QueryString["price"] != null))
            {
                ddlType.SelectedValue = Request.QueryString["loai"];
                ddlPrice.SelectedValue = Request.QueryString["price"];
            }
        }
    }
}